package com.xinzhu.consumer;

import org.springframework.amqp.core.Message;
import org.springframework.amqp.core.MessageListener;
import org.springframework.amqp.rabbit.listener.adapter.MessageListenerAdapter;
import org.springframework.stereotype.Service;

import java.util.Map;

@Service
public class Consumer extends MessageListenerAdapter {


    public void handleMessage(Map message) {
        System.out.println("消费者：" +message.get("data"));
    }
}